home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-4543 / mvg / mod_code / meth1.s < prev    next >
Text File  |  1987-04-21  |  20KB  |  665 lines

  1. ;MVG Module Method #1: Copy Entire Packet into Module's memory
  2. ; can be used as "inlude" file if observing proper labels and stack.
  3.  
  4. ***************************************************************************
  5. *                                      *
  6. * ------------------------ First, the legalese -------------------------- *
  7. *                                      *
  8. * Source code Copyright (C) 1989,90 W. David Parks. All rights reserved.  *
  9. * No part of this SOURCE CODE may be reproduced, transmitted, transcribed *
  10. * stored in a retrieval system, or translated in any form or by any means *
  11. * without the prior written permission of the author, W.D.Parks          *
  12. *                                      *
  13. *                                      *
  14. * We make no representations or warranties with respect to the contents   *
  15. * of this document and specifically disclaim any implied warranties or    *
  16. * merchantability, or fitness for any particular purpose.                 *
  17. *                                      *
  18. * ----------------------------------------------------------------------- *
  19. *                                      *
  20. *    Written permission is granted to registered owners to use         *
  21. *       any or all of this source code in their own modules for           *
  22. *    private use. Please contact Dr. Bobware for details for           *
  23. *    any commercial use.                          *
  24. *                                      *
  25. *                                      *
  26. *                                      *
  27. ***************************************************************************
  28.  
  29. * last changed: 02/09/90
  30.  
  31.  
  32. * this source code is intended for HiSoft's Assembler, GENST2.
  33. * other assemblers can be used with little modification.
  34. * the biggest requirement is it's MACRO capability.
  35. * after having Macros, I find it quite hard to live without them.
  36. * although I'm sure I remember a time when I did... 
  37. * or was that just a nightmare I once had... I dunno...
  38.  
  39. ;source code is copyright w.david parks, all rights reserved
  40. ;
  41. ;
  42.  
  43.  
  44. ;METHOD #1, Packet Access
  45. ;(Method#1 is affectionately termed: the "crazy mixed-up method")
  46. ;
  47. ;file 1 of 2 for module design
  48. ;
  49. ;packet contains pointers to true variables and routines
  50. ;MVG's variables are both word and long, their assignment
  51. ;here is rather intuitive...
  52. ;
  53. ;
  54. ;Certainly, not all the functions in the Packet will be required
  55. ;by your module. Use only the ones necessary and save memory space.
  56. ;Although... I don't bother anymore... I use Method#2, but even when
  57. ;using this method, copying the entire packet into local memory
  58. ;only requires about 1k or so... so... I quit being "byte_crunchy".
  59. ;
  60. ;
  61. ;
  62. ; pointer_offset     size of MVG var/function
  63. ;-------------------------------------
  64. MAIN_IMAGE equ 0    ;long,buff main image buffer (actual pointer)
  65. MAIN_LEN   equ 4    ;long,var  length of main image buffer (actual value)
  66.  
  67. *--- from this point on, all items are pointers to MVG's vars or Routines
  68.  
  69. WIDTH      equ 8    ;word, byte-width of image
  70. HEIGHT     equ 12   ;word, raster height of image
  71. CLIPBOARD  equ 16   ;long,buff a 0 here means no buffer (oops, actual pointer)
  72. CLIPBFLAG  equ 20   ;word, 0= no clip exists in clipboard
  73. CLIPBDISP  equ 24   ;rout, display clipboard
  74. GDISPLAY   equ 28   ;rout, display main_image (see top_row/tabber)
  75. TOP_ROW    equ 32   ;word, 1st row of main_image displayed
  76. TABBER     equ 36   ;word, 1st TAB (offset from left, 8 pixel increments)
  77. FULLFLAG   equ 40   ;word, used for displaying 400 rasters (vs 381)
  78. DISP_LINS  equ 44   ;word, rasters to display (use caution)
  79. VID_PLAY   equ 48   ;long, adrs of video memory (usually at row#19)
  80. FILENAME   equ 52   ;buff, adrs of internal string for full pathspec
  81. MISC_DIR   equ 56   ;buff, adrs for path string (used in f_sel)
  82. MISC_FIL   equ 60   ;buff, adrs for filename only (used in f_sel)
  83. ASK_MISC   equ 64   ;rout, f_sel, returns D0=-1 if error, else ok
  84. WHEREM     equ 68   ;rout, poll mouse. D1.L=X,Y  D0.b= button_status
  85. MOUSE_XY   equ 72   ;long, dupe of mouse X,Y. (set by wherem, same as D1)
  86. SETSIZE    equ 76   ;rout, set dims for line_a calls (*), d0-d3=x,y,w,h
  87. DRAWBOX    equ 80   ;rout, *draw box outline 
  88. DRAWXBOX   equ 84   ;rout, *draw box outline (using XOR write mode)
  89. ATOG_NRM   equ 88   ;rout, restore Normal replace write_mode
  90. ATOG_XOR   equ 92   ;rout, *set XOR write_mode
  91. RECTANG_Q  equ 96   ;rout, *draw a filled box
  92. SET_LINE  equ 100   ;rout, *
  93. MAKELINE  equ 104   ;rout, *
  94. TOPTITLE  equ 108   ;rout, centered string in menu_bar area. A0->string
  95. PHEX1     equ 112   ;rout, print 2-digit hexascii, D0.b
  96. HEXIT     equ 116   ;rout, print 4-digit hexascii, D0.w
  97. HEXITL    equ 120   ;rout, print 8-digit hexascii, D0.L
  98. BDEC2     equ 124   ;rout, print 2-digit decimalascii, (00-99)
  99. BDEC3     equ 128   ;rout, print 2-digit decimalascii, (000-999)
  100. BDEC4     equ 132   ;rout, print 2-digit decimalascii, (0000-9999)
  101. ANYKEY    equ 136   ;rout, wait for keypress, returns in D0.L
  102. HI_STRING equ 140   ;rout, print ascii_z string, A0-> string
  103. HI_CHAR   equ 144   ;rout, print single char in D0.b
  104. ;---------------------1.20i-------------------------------------
  105. ORIG_PIXES equ 148  ;word, pixel width of current image
  106. RFILENAME  equ 152  ;buff, last loaded filename
  107. OLDREZW    equ 156  ;2wor, H/V microns (as loaded)
  108. IREZ_W     equ 160  ;2wor, horz/vert microns for current image
  109. STILLSEC   equ 164  ;rout, checks for image overrun into clipboard
  110. MOTHER     equ 168  ;rout, Floyd
  111. ALERTER    equ 172  ;rout, form_alert call. A0->alert_string, d0=button
  112. INT_IN     equ 176  ;buff, int_in AES array used by MVG
  113. ADDR_IN    equ 180  ;buff, addr_in ...
  114. INT_OUT    equ 184  ;buff, int_out ...
  115. ADDR_OUT   equ 188  ;buff, addr_out...
  116.  
  117. ADDEXT     equ 192  ;rout, add extension to filename_string   ;A0 to A1
  118. COPYTOZ    equ 196  ;rout, copy string to string              ;A0 to A1
  119. APPENDTO   equ 200  ;rout, append 1 string onto another       ;A0 to A1
  120. GETPICLEN   equ 204 ;rout, fetch len of image     D0=len, D1=endofimage
  121. YOU_ACTION  equ 208 ;
  122. ROUND_PIXES equ 212 ;
  123. DRAGABOX    equ 216 ;
  124. SETMOUSEXY  equ 220 ;rout, set mouse to specific X,Y coord  D0.L=X,Y
  125.  
  126.  
  127. ***************************************************************************
  128. ***************************************************************************
  129. ***************************************************************************
  130. ***************************************************************************
  131. ***************************************************************************
  132.  
  133.  
  134. ;-------------------------------------------------------------------------
  135. ;AGRAB and GRAB must be used while packet adrs is in A6
  136. ;-------------------------------------------------------------------------
  137. ;these offered me easy access to single pointers in the packet, but since
  138. ;it is easier to copy the whole thing at once, you may forget these....
  139. ;
  140. ;
  141. ;-------------------------------- fetch adrs of packet_entry 
  142. AGRAB macro packet#,dest_var
  143.  move.l \1(a6),\2
  144.  endm
  145. ;sample:
  146. ;
  147. ;AGRAB #WID,_width      _width now holds pointer to MVG's variable WID
  148. ;-------------------------------------------------------------------------
  149. ;
  150. ;-------------------------------- fetch value of packet_entry's variable
  151. GRAB macro packet#,dest_var
  152.  move.l \1(a6),a0
  153.  move.\0 (a0),\2
  154.  endm
  155. ;sample:
  156. ;
  157. ;GRAB #WID,width        width now holds image's width
  158. ;-------------------------------------------------------------------------
  159.  
  160.  
  161. ;------------------------------- qwik method to call an MVG routine
  162. ;                                without garbaging any registers, but
  163. ;                                cannot be used IN_LINE...
  164. ;                                see sample calls to MVG routines
  165. subber macro whr
  166.  push.l \1
  167.  rts
  168.  endm
  169. ;
  170. ;sample:
  171. ;
  172. ;gimme_a_key subber _anykey     ;"_anykey" must hold pointer to ANYKEY
  173. ;                               ;from Packet List...
  174. ;-------------------------------------------------------------------------
  175.  
  176.  
  177.  
  178. *****************************************************************************
  179. **************************  MACROS for EASY Functions ***********************
  180. *****************************************************************************
  181. ******************************* 
  182. ******************************* 
  183. ******************************* 
  184. ******************************* Lazy_Typer's MOVE.? _whatever_,-(sp)
  185. ******************************* 
  186. ******************************* ie  Push something on the stack
  187. ******************************* 
  188. ******************************* HISOFT option "\0" automatically
  189. ******************************* appends any entered size, default=W
  190. ******************************* sample:  PUSH.L #4   = move.l #4,-(sp)
  191.  
  192. push macro
  193.  move.\0 \1,-(sp)
  194.  endm
  195.  
  196. ******************************* Lazy_Typer's MOVE.? (sp)+,_whatever_
  197. ******************************* 
  198. ******************************* ie  Pop something off the stack
  199. ******************************* 
  200. ******************************* HISOFT option "\0" automatically
  201. ******************************* appends any entered size, default=W
  202. ******************************* sample:  POP.L D7   = move.l (sp)+,D7
  203.  
  204. pop macro
  205.  move.\0 (sp)+,\1
  206.  endm
  207.  
  208. ******************************* 
  209. ******************************* Lazy_Typer's MOVEM.L A0-A6/D0-D7,-(sp)
  210. ******************************* 
  211. ******************************* ie  push everything on the stack!
  212. ******************************* 
  213.  
  214. pha macro
  215.  movem.l a0-a6/d0-d7,-(sp)
  216.  endm
  217.  
  218. ******************************* 
  219. ******************************* Lazy_Typer's MOVEM.L (sp)+,A0-A6/D0-D7
  220. ******************************* 
  221. ******************************* ie  pop everything back off the stack!
  222. ******************************* 
  223.  
  224. pla macro
  225.  movem.l (sp)+,a0-a6/d0-d7
  226.  endm
  227.  
  228. *****************************************************************************
  229. **************************       End of MACROS       ***********************
  230. *****************************************************************************
  231.  
  232.  
  233.  
  234. ;=================================================================
  235. ;MOD_INI: Initialization routines for Module setup
  236. ;file 2 of 2 for module design
  237. ;
  238.  section text
  239.  
  240. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  241.  
  242. ; the program proper
  243.  
  244. PRG_INIT:
  245.  bra .begin
  246.  dc.b 'MVG Module xxxxx xxxxx xxxxx x',0    ;for future identification
  247.  even
  248.  
  249. .begin
  250.  
  251. ;----- Here we have the standard ol' PRG initialization.        --------------
  252. ;      If this is used as an INCLUDE source file, then your     --------------
  253. ;      programming need not include this, as it's already here! --------------
  254. ;-----------------------------------------------------------------------------
  255.  
  256.     move.l    4(a7),a3        base page
  257.     move.l  a3,basepage        save, cuz this gets hard to find later
  258.     move.l    #ustack,a7
  259.     move.l    $c(a3),d0        text len
  260.     add.l    $14(a3),d0        data len
  261.     add.l    $1c(a3),d0        BSS len
  262.     add.l    #$100,d0        basepage
  263.     move.l    d0,-(sp)
  264.     move.l    a3,-(sp)
  265.     clr.w    -(sp)
  266.     move.w    #$4a,-(sp)
  267.     trap    #1            shrink memory
  268.     lea    12(sp),sp
  269.  
  270.  
  271. ;-------------------------------------------
  272. ;start test for MVG signature -----------------------------------------------
  273. ;-------------------------------------------
  274.  
  275.         move.l $24(a3),a0            parent's basepage adrs
  276.         move.l a0,parent
  277.         add.l #$80,a0                A0--> parent's cmdline
  278.         move.l (a0)+,a6              A6--> MVG's Packet
  279.         move.l a6,mvg_packet         adrs of packet (local label)
  280.  
  281.         move.l (a0)+,d0              0,"MVG"  signature 
  282.         move.l (a0)+,d1              "0.20"   version number (ascii)
  283.  
  284.         cmp.l MVG_SIG,d0             ;0,"MVG"
  285.         bne badbye                   ;MVG is not the caller... no packet
  286.  
  287.         add.b #1,ernum
  288.         cmp.l MVG_VER,d1             ;"0.20"
  289.         blt badver                    ;MVG is older version than required.
  290.         bgt .2a                       ;additional checking can be made on
  291.                                       ;word following version number in
  292.                                       ;parent's basepage, if necessary.
  293.  
  294.       move.b (a0),d0                  ;fetch character (version extension)
  295.       cmp.b min_ver,d0                ;"h" is earliest version usable
  296.       blt badver
  297. .2a
  298.  
  299. ;-------------------------------------------
  300. ;end test for MVG signature -----------------------------------------------
  301. ;-------------------------------------------
  302.  
  303.  
  304.  
  305. ;-------------------------------------------
  306. ;Copy packet to local mem   -----------------------------------------------
  307. ;-------------------------------------------
  308.  
  309. read_packet:            ;copy MVG's packet into local memory space so
  310.                         ;we can use local labels
  311.  lea packet,a1
  312.  move.l a6,a0
  313.  move.l #99,d0        ;gonna copy 99 long pointers (packet has fewer)
  314. .1
  315.  move.l (a0)+,(a1)+
  316.  dbf d0,.1
  317.  
  318.  
  319.  GRAB WIDTH,wid        ; make copy of WID in local space
  320.  GRAB HEIGHT,hgt    ; make copy of HGT in local space
  321.  
  322.  clr.w cb_flag
  323.  tst.l clipboard    ; see if ClipBoard is active, may not be!
  324.  beq .2            ; a zero means that memory was tight, no ClipBoard!
  325.  move.w #1,cb_flag    ; set a local flag that clipboard is FINE
  326.  sub.l #32000,buflen    ; and reduce max size of main image buffer
  327. .2
  328.  
  329.  
  330. ;---------------------- optional, for display of image from very top left
  331. ; AGRAB TOP_ROW,a0 
  332. ; clr.w (a0)             ;top_row & tabber to zero,
  333. ; AGRAB TABBER,a0
  334. ; clr.w (a0)
  335.  
  336. ;---------------------- optional
  337. ; bsr gdisplay         ;display main image, good idea but not required.
  338.  
  339.  
  340.  
  341. ****************************************************
  342. ****************************************************
  343. ****************************************************
  344.  
  345.  
  346.  jmp Main_Action    ; go do your code..........
  347.  
  348.  
  349. ****************************************************
  350. ****************************************************
  351. ****************************************************
  352.  
  353. ;-------------------------------------------
  354. ;Section for bad or missing MVG -------------------------------------------
  355. ;-------------------------------------------
  356.  
  357. badver
  358.  lea ermsg2,a0            ;print error msg
  359.  bsr sysprin
  360.  add.b #1,MVG_VER         ;show required version#
  361.  lea MVG_VER,a0
  362.  bsr sysprin
  363.  bra byex
  364.  
  365. badbye
  366.  lea ermsg,a0          ;No Packet Provided (MVG not parent of module)
  367.  bsr sysprin
  368.  lea ermsg2a,a0 
  369.  bsr sysprin
  370.  lea MVG_VER,a0
  371.  bsr sysprin
  372.  
  373. byex
  374.  push.w #7
  375.  trap #1
  376.  addq.l #2,sp
  377.  bra gbyeoops
  378. gbye: 
  379. gbyeoops
  380.         push.w #2               ;at this time, MVG does not inquire
  381.         push.w #$4c             ;for an error return number. This
  382.         trap #1                 ; #2 is arbitrarily selected here.
  383.  
  384. sysprin                ;print string using GEMDOS
  385.  push.l a0
  386.  push.w #9
  387.  trap #1
  388.  addq.l #6,sp
  389.  rts
  390.  
  391. ermsg dc.b 27,'Y',32,32,27,'K Err# '
  392. ernum dc.b '0   Cannot Find MVG Packet.',7,0
  393.  even
  394. ermsg2 dc.b 27,'Y',32,32,27,'K'
  395. ermsg2a dc.b ' Requires MVG version # ',0
  396.  even
  397.  
  398.                 
  399. MVG         dc.w 0,0        
  400. MODULE_ID   dc.w 0,0
  401.  
  402. MVG_SIG     dc.b 0,'MVG'
  403. MVG_VER     dc.b '0.20'         ;minimum version MVG to use this module
  404. MVG_SUBVER  dc.b 'i',0          ;a sub version is always 1-byte long.
  405. basepage    dc.l 0 
  406. parent      dc.l 0
  407. mvg_packet  dc.l 0
  408. min_ver     dc.b 'i',0          ;SET REQUIRED MINIMUM CHAR HERE
  409.  
  410. wid dc.w 0            ;local usage of WID
  411. hgt dc.w 0            ;ditto for HGT
  412.  
  413. cb_flag   dc.w 0        ;and a flag for a valid/invalid clipboard
  414.  
  415.  
  416.  
  417. ;-------------------- the entire packet will be copied from MVG's memory space
  418. ;-------------------- to here, in the modules memory space, by READ PACKET
  419. packet:
  420. bgraph    dc.l 0
  421. buflen    dc.l 0
  422. _wid      dc.l 0
  423. _hgt      dc.l 0
  424. clipboard dc.l 0
  425. _clipflag dc.l 0
  426. _clipdisp dc.l 0
  427. _gdisplay dc.l 0
  428. _top_row  dc.l 0
  429. _tabber   dc.l 0
  430. _fullflag dc.l 0
  431. disp_lins dc.l 0
  432. _vid_play dc.l 0
  433. _filename dc.l 0
  434. _miscdir  dc.l 0
  435. _miscfil  dc.l 0
  436. _askmisc  dc.l 0
  437. _wherem   dc.l 0
  438. _mouse_xy dc.l 0
  439. _setsize  dc.l 0
  440. _drawbox  dc.l 0
  441. _drawxbox dc.l 0
  442. _atognrm  dc.l 0
  443. _atogxor  dc.l 0
  444. _rectangq dc.l 0
  445. _setline  dc.l 0
  446. _makeline dc.l 0
  447. _toptitle dc.l 0
  448. _phex1    dc.l 0
  449. _hexit    dc.l 0
  450. _hexitl   dc.l 0
  451. _bdec2    dc.l 0
  452. _bdec3    dc.l 0
  453. _bdec4    dc.l 0
  454. _anykey   dc.l 0
  455. _histring dc.l 0
  456. _hichar   dc.l 0
  457. ;---------------------1.20i-------------------------------------
  458. _origpix  dc.l 0
  459. _rfilename dc.l 0
  460. _oldrezw  dc.l 0
  461. _irezw    dc.l 0
  462. _stillsec dc.l 0
  463. _mother   dc.l 0
  464. _alerter  dc.l 0
  465. _intin    dc.l 0
  466. _addrin   dc.l 0
  467. _intout   dc.l 0
  468. _addrout  dc.l 0
  469.  
  470. _addext   dc.l 0
  471. _copytoz  dc.l 0
  472. _appendto dc.l 0
  473. _getpiclen dc.l 0
  474. _you_act  dc.l 0
  475. _roundpix dc.l 0
  476. _dragabox dc.l 0
  477. _setmousexy dc.l 0
  478.  
  479.  dcb.l 50,0        ;extra room for safety sake
  480.  
  481.  
  482.  
  483.  
  484. ;-------------------------------------------
  485. ;Section for accessing MVG's routines -------------------------------------
  486. ;-------------------------------------------
  487.  
  488.  
  489.  
  490. ;---------------------  Local variables, (you may need them or... not)
  491. mouse_xy
  492. mouse_x dc.w 0
  493. mouse_y dc.w 0
  494.  
  495.  
  496. wherem 
  497.  bsr .wherem2
  498.  move.l d1,mouse_xy
  499.  rts
  500. .wherem2 subber _wherem
  501.  
  502.  
  503. ;-------- all the rest of the routines that access the Packet.
  504. ;         you may need them, or you may not...here they all are
  505.  
  506. copytoz        subber _copytoz
  507. hi_string     subber _histring
  508. hi_char        subber _hichar
  509. addext         subber _addext
  510. appendto    subber _appendto
  511. bdec2        subber _bdec2
  512. bdec3        subber _bdec3
  513. bdec4        subber _bdec4
  514. phex1        subber _phex1
  515. hexit        subber _hexit
  516. hexitl        subber _hexitl
  517. anykey        subber _anykey
  518. drawbox        subber _drawbox
  519. drawxbox    subber _drawxbox
  520. askmisc        subber _askmisc
  521. setsize        subber _setsize
  522. mother        subber _mother
  523. alerter        subber _alerter
  524. setmousexy    subber setmousexy
  525. atognrm        subber _atognrm
  526. atogxor        subber _atogxor
  527. rectangq    subber _rectangq
  528. setline        subber _setline
  529. makeline    subber _makeline
  530. toptitle    subber _toptitle
  531. stillsec    subber _stillsec
  532.  
  533. gdisplay    subber _gdisplay
  534.  
  535. ;-----------------------------
  536.  
  537. ********************************************************************
  538. ********************************************************************
  539. ********************************************************************
  540. ***** CUT HERE to use as an INCLUDE file for your own modules ******
  541. *** Just remember to use the label for the stack in the BSS area ***
  542. ****  AND have your routine start with the label: Main_Action  *****
  543. ****    OR... use whatever label you want in place of M_A...   *****
  544. ********************************************************************
  545. ********************************************************************
  546. ********************************************************************
  547.  
  548. Main_Action
  549.  
  550.  
  551. ;        YOUR CODE GOES HERE
  552. ;
  553. ;               but here's a sample anyway......
  554.  
  555.  
  556.  
  557.      bsr gdisplay         ;display the current image
  558.      lea first_lert,a0
  559.      moveq #1,d0
  560.      bsr alerter
  561.      
  562.      cmp.w #2,d0
  563.      beq goombye
  564.  
  565.  
  566. grid_rows:
  567.      
  568.      move.l bgraph,a3
  569.       
  570.      clr.l d7
  571.      clr.l d6
  572.      clr.l d5
  573.      
  574.      move.w hgt,d7
  575.      move.w wid,d6
  576.      move.l d6,d5
  577.      lsl.l #3,d5           ;every 8 rows     
  578.  
  579. .0     
  580.      move.b #$ff,d0
  581.      move.l a3,a2
  582.      move.l d6,d1
  583.      subq.w #1,d1
  584. .1     
  585.      move.b d0,(a2)+
  586.      dbf d1,.1
  587.      
  588.      add.l d5,a3
  589.      sub.w #8,d7
  590.      bpl .0
  591.      
  592.  
  593. grid_columns:
  594.      
  595.      move.l bgraph,a3
  596.       
  597.      clr.l d7
  598.      clr.l d6
  599.      clr.l d5
  600.      
  601.      move.w hgt,d7
  602.      move.w wid,d6
  603.      move.l d6,d5
  604.  
  605.      subq.w #1,d5
  606.      
  607. .0     
  608.      move.b #$80,d0
  609.      move.l a3,a2
  610.      move.l d7,d1
  611.      subq.w #1,d1
  612. .1     
  613.      move.b (a2),d2
  614.      or.b d0,d2
  615.      move.b d2,(a2)
  616.      add.l d6,a2
  617.      dbf d1,.1
  618.      
  619.      addq.l #1,a3
  620.      dbf d5,.0
  621.      
  622. ;     bsr anykey
  623.      bra goombye
  624.      nop
  625.      
  626.  
  627.  
  628.  
  629. goombye
  630.  push.w #0
  631.  push.w #$4c        P_TERM, this is the way we exit a module
  632.  trap #1                (but you knew that)
  633.  
  634.  
  635. ********************************************************************
  636. ********************************************************************
  637. ********************************************************************
  638.  section data
  639.  even
  640.  
  641.  
  642. ;for sample module
  643.  
  644. myvideo dc.l 0
  645.  
  646. first_lert dc.b '[0]['
  647.  dc.b ' Draw a Grid on |'
  648.  dc.b '  the current   |'
  649.  dc.b '    Image?      ]'
  650.  dc.b '[Yes|No]'
  651.  even
  652.  
  653.  
  654.  section bss
  655.  even
  656.  
  657.  ds.l 300
  658. ustack ds.l 1
  659.  
  660.  
  661.  
  662.  
  663.  end
  664.